prevent fs error