Change loggin to a file, bug in the input args