add flash to base template and try to handle large file size errors