move log file to shared
better error handling