fixed logging to use file set by api