Moving log file to /var/run.
diff --git a/Dockerfile b/Dockerfile
index 91a7641..6a7d2ab 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -36,6 +36,9 @@
 # will be used by attached slave agents:
 EXPOSE 50000
 
+ENV COPY_REFERENCE_FILE_LOG /var/log/copy_reference_file.log
+RUN touch $COPY_REFERENCE_FILE_LOG && chown jenkins.jenkins $COPY_REFERENCE_FILE_LOG
+
 USER jenkins
 
 COPY jenkins.sh /usr/local/bin/jenkins.sh
diff --git a/jenkins.sh b/jenkins.sh
index 1efe1c2..da0dd65 100755
--- a/jenkins.sh
+++ b/jenkins.sh
@@ -6,18 +6,19 @@
 # can then change this, upgrade plugins, etc.
 copy_reference_file() {
 	f=${1%/} 
-	echo "$f" >> /tmp/copy_reference_file.log
+	echo "$f" >> $COPY_REFERENCE_FILE_LOG
     rel=${f:23}
     dir=$(dirname ${f})
-    echo " $f -> $rel" >> /tmp/copy_reference_file.log
+    echo " $f -> $rel" >> $COPY_REFERENCE_FILE_LOG
 	if [[ ! -e /var/jenkins_home/${rel} ]] 
 	then
-		echo "copy $rel to JENKINS_HOME" >> /tmp/copy_reference_file.log
+		echo "copy $rel to JENKINS_HOME" >> $COPY_REFERENCE_FILE_LOG
 		mkdir -p /var/jenkins_home/${dir:23}
 		cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel}; 
 	fi; 
 }
 export -f copy_reference_file
+echo "--- Copying files at $(date)" >> $COPY_REFERENCE_FILE_LOG
 find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
 
 # if `docker run` first argument start with `--` the user is passing jenkins launcher arguments