Messed up when creating log and opening files, running in cron requires absoulte paths.