serialize file as integer id