Add logging to output file
Fix image helper