Implemented script folder configuration, and improved error handling.