added loggin to file