fixed try/catch blocks in the main script