moved size check to fileHelper