Finally around env issues. Fix up a few issues with file uploading