corrected attachment argument
handle stdout via logger
Merge from solverio/master