small fix for file opening