Implemented loadMedia() to properly parse files