Fixes file open