validation for file extension on save function