Check if file exists before create