Custom implementation of serveStaticFile.