fix some data attachment issues and move file allowed check to FS.Collection