deleted compiled API code
added more exceptions and file management to save function in API