switched to absolute paths, moved logging out of ifmain