adds handling for failure to create new files