How to log every error in file you get in cmd