Use Post::File methods when possible. They try to be multiplatform and multisession. The file_rm method looks good to be used here