add file logs/exception handling