closing maze file after reading