in reply to Why does this crash? (Error 500)

Did you set the permissions to create the file? Do the directories exist?