Removed error when opening file by adding default