add shebang
log file is now written to the home directory, some cleanups