Fixed an error using the output file argument.
Changed a print to stdout by a logging to debug.
Fixed an error calling logging.
Fixed an error passing the name of the file of objects of interest.