Create log file instead of exception throwing