Added REQUIREMENTS file
Created a try-except block in resize function