file_entity related fixes + locking on metadata fields