Added loggin to file