Output logs to stderr
Add file check utils