Improved callbacks, fixed path bug in getFile